/**
 * @file departmentmate 接口实现
 * @author eabax-FE
 */
import request from '@/utils/request'
const prefix = '/global' // 这里需要修改为微服务网关的前缀

/**
 * @name 增加、编辑
 * @description 增加、编辑：主键ID空时：增加
 * @param body  departmentmate
 * @return
 */
export function addOrUpdateFn(departmentmate) {
  return request({
    url: `${prefix}/departmentmate`,
    method: 'post',
    data: departmentmate
  })
}
/**
 * @name 一键匹配
 * @description 一键匹配
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @param path integer matetype
 * @return
 */
export function autoMateFn(data, matetype) {
  return request({
    url: `${prefix}/departmentmate/automate/${matetype}`,
    method: 'POST',
    data
  })
}
/**
 * @name 清除全部科室匹配数据
 * @description 清除全部科室匹配数据
 * @param path integer lngproductid
 * @return
 */
export function clearAllMateFn(lngproductid) {
  return request({
    url: `${prefix}/departmentmate/clearallmate/${lngproductid}`,
    method: 'delete'
  })
}
/**
 * @name 清除科室匹配数据
 * @description 清除科室匹配数据
 * @param path integer lngproductid
 * @param path integer lngdepartmentid
 * @return
 */
export function clearMateFn(lngproductid, lngdepartmentid) {
  return request({
    url: `${prefix}/departmentmate/clearmate/${lngproductid}/${lngdepartmentid}`,
    method: 'delete'
  })
}
/**
 * @name 按科室匹配
 * @description 按科室匹配
 * @param body  departmentmateListResultList
 * @param path integer lngdepartmentid
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @return
 */
export function autoDepartmentMateFn(departmentmateListResultList, lngdepartmentid, lngproductid, lngmateproductid) {
  return request({
    url: `${prefix}/departmentmate/departmentmate/${lngdepartmentid}/${lngproductid}/${lngmateproductid}`,
    method: 'post',
    data: departmentmateListResultList
  })
}
/**
 * @name 根据条件查询
 * @description 根据条件查询
 * @param body  departmentmate
 * @return
 */
export function findSearchFn(departmentmate) {
  return request({
    url: `${prefix}/departmentmate/search`,
    method: 'post',
    data: departmentmate
  })
}
/**
 * @name 分页+多条件查询
 * @description 分页+多条件查询
 * @param body  departmentmate
 * @param path integer page
 * @param path integer size
 * @return
 */
export function findSearchPageFn(departmentmate, page, size) {
  return request({
    url: `${prefix}/departmentmate/search/${page}/${size}`,
    method: 'post',
    data: departmentmate
  })
}
/**
 * @name 已匹配科室列表
 * @description 已匹配科室列表
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @param path integer lngdepartmentid
 * @return
 */
export function searchAlreadyMateDepartmentFn(data) {
  return request({
    url: `${prefix}/departmentmate/searchalreadymate`,
    method: 'POST',
    data
  })
}
/**
 * @name 根据所选产品子系统加载科室树
 * @description 根据所选产品子系统加载科室树
 * @param path integer lngproductid
 * @return
 */
export function searchDepartmentByProductFn(lngproductid) {
  return request({
    url: `${prefix}/departmentmate/searchdepartment/${lngproductid}`,
    method: 'get'
  })
}
/**
 * @name 科室匹配列表
 * @description 科室匹配列表
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @return
 */
export function searchMateDepartmentFn(data, page, size) {
  return request({
    url: `${prefix}/departmentmate/searchmatedepartment/${page}/${size}`,
    method: 'POST',
    data
  })
}
/**
 * @name 未匹配科室列表
 * @description 未匹配科室列表
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @return
 */
export function searchUnMateDepartmentFn(data) {
  return request({
    url: `${prefix}/departmentmate/searchunmate`,
    method: 'POST',
    data
  })
}
/**
 * @name 未匹配科室数量
 * @description 未匹配科室数量
 * @param path integer lngproductid
 * @param path integer lngmateproductid
 * @return
 */
export function searchUnMateDepartmentCountFn(data) {
  return request({
    url: `${prefix}/departmentmate/searchunmatecount`,
    method: 'POST',
    data
  })
}
/**
 * @name 根据ID查询
 * @description 根据ID查询
 * @param path integer id
 * @return
 */
export function findByIdFn(id) {
  return request({
    url: `${prefix}/departmentmate/${id}`,
    method: 'get'
  })
}
/**
 * @name 删除
 * @description 删除
 * @param path integer id
 * @return
 */
export function deleteFn(id) {
  return request({
    url: `${prefix}/departmentmate/${id}`,
    method: 'delete'
  })
}
